<include file="__THEME__/header" />
<include file="__THEME__/page_top" />
<div class="login_error b_e74">
	<div class="w_430 tc ov">
		<h2 class="t_14 c_fff p_t10">一份验证邮件已经发送到你的邮箱：<a href="#" class="c_fff">kylin9624@163.com</a></h2>
        <p class="p_t10 c_fff">如果您没有受到激活邮件，可能是邮件服务商错误判断为垃圾邮件，请进入您的垃圾邮件箱查看。<a class="c_fff" href="#">点击&gt;这里</a>重新发送激活邮件</p>
    </div>
</div>
<div class="w_970 ov">
	<div class="fl w_720">
    	<h2 class="t_26 c_333 p_t35 bold_n"><a href="#" class="c_009">帐户</a>/个人资料</h2>
        <h3 class="t_14 p_b10 bold_n c_666">编辑您的姓名，头像等。</h3>
        <include file="_tabs" />
        <div class="login_dl m_b20">
        <form name="ajax_user_form" id="ajax_user_form" action="{:U('public/Account/doSaveProfile')}" method="post">
    	<input type="hidden" name="old_name" value="{$user_info['uname']}" />
    	<dl>
        	<dt>姓名：</dt>
            <dd><input id="uname" name="uname" type="text" value="{$user_info.uname}" class="iut c_999 b_fff">
            	<div class="bc c_999">我们在这里大多使用真实姓名，方便人们知道谁是谁</div>
            </dd>
            
        </dl>
        <dl>
        	<dt>个性域名：</dt>
            <dd><input id="domain" name="domain" type="text" value="{$user_info.domain}" class="iut c_999">
            <div class="bc c_999">您索乐网址：http://happysolo.com/kylinz<span class="c_f06">已被占用</span></div>
            </dd>
            
        </dl>
        <dl>
        	<dt>位置：</dt>
            <dd>{:W('Area',array('curPro'=>$user_info['province'],'curCity'=>$user_info['city'],'area'=>$user_info['area'],'city_names'=>$user_info['location'],'tpl'=>'selectArea'))}
            	<div class="bc c_999">留下您常在的城市</div>
            
            </dd>
            
        </dl>
        <dl>
        	<dt>您的网站：</dt>
            <dd><input id="web_site" name="web_site"  type="text" value="{$user_info.web_site}" class="iut">
            <div class="bc c_999">个人或者团队的网站，格式：http://www.happysolo.com</div>
            </dd>
            
        </dl>
        <dl>
        	<dt>微信帐号：</dt>
            <dd><input id="weixin_account" name="weixin_account" type="text" value="{$user_info.weixin_account}" class="iut">
            
            <div class="bc c_999">微信，你懂的。</div>
            </dd>
            
        </dl>
        <dl>
        	<dt>简介：</dt>
            <dd><textarea id="intro" name="intro" cols="" rows="" class="bor b_e6e6e6">{$user_info.intro}</textarea>
            <div class="bc c_999"><b class="fr">160</b>用160字简单的介绍自己。</div>
            </dd>
            
        </dl>
        <dl>
        	<dt>展望：</dt>
            <dd><div class="p_t10"><input name="pro_members" type="checkbox"<if condition=" 1 eq $user_info['pro_members'] ">checked</if> value="1" class="m_r5" /><label class="c_999 t_14">我愿意被邀请成为<a href="#" class="c_009">专业会员</a></label></div></dd>
        </dl>
        <dl>
        	<dt></dt>
            <dd><a class="tc butas bor di b_fff w_255 c_f06" href="javascript:;" onclick="$('#ajax_user_form').submit();">更新设置</a></dd>
        </dl>
        <dl>
        	<dt></dt>
            <dd><a class="c_009 fr p_q20" href="#">删除您的帐户</a></dd>
        </dl>
        </form>
        </div>
	</div>
	<div class="w_220 fr p_t25">
    	<div class="yj b_fff p_q10 artis_yc_top">
        	<p class="t_14 tc c_666">获取<i class="yj b_f83 c_fff text_i t_12">PRO</i>版 人民币：150/年</p>
            <p class="tc c_999">产品搜索更多，免费试用。</p>
        </div>
    	
    	<div class="fr w_220">
    	<div class="t_14 c_666 b_b2 p_b10" style="padding-top:6px">你的头像</div>
    	<form id="avatar_setting_form" name="avatar_setting_form" enctype="multipart/form-data" action="{:U('public/Account/doSaveAvatar')}" method="post" >
        <div class=" p_t20 m_b20">
        	<a href="javascript:;"><img id="user_avatar" src="{$user_info['avatar_middle']}" width="80" height="80"></a>
        	<p class="p_t25">
        		<input id="avatar" name="avatar" type="file" class="m_r10">
        	</p>
            <p class="p_t10 c_666">JPG,GIF或PNG。多最大大小700K</p>
            <p class="p_t10"><a class="tc butas bor di b_fff c_f06" style="width:217px"
             	href="javascript:;" onclick="$('#avatar_setting_form').submit();">上传&gt;</a></p>
        </div>
        </form>
		{:W('UserSkills', array('uid'=>$uid))}
        <div>
        	<p class="b_e6e6e6 l_35 tc c_666">http://happysolo.com/i/17123432</p>
            <a href="#" class="cf06 l_24">复制邀请站外好友</a>
        </div>
    </div>
    	
    </div>
<script>

$(document).ready(function() { 
    $('#ajax_user_form').submit(function(){
        $(this).ajaxSubmit({
            beforeSubmit:  function(){
            	if($('#uname').val().length == 0) {
            		ui.error('帐号不能为空');
                    return false;
                }
            },
            success: function(json){
            	if( json.status == 1 ){
            		ui.success(json.info);
            	}else if(json.status == 2){
            		
            	}else{
            		ui.error(json.info);
            	}
            },
            dataType: 'json'
        }); 
        return false; 
    });
    $('#avatar_setting_form').submit(function(){
        $(this).ajaxSubmit({
            beforeSubmit:  function(){
            	if($('#avatar').val().length == 0) {
            		ui.error('请选择文件');
                    return false;
                }
            },
            success: function(json){
            	if( json.status == 1 ){
            		ui.success(json.info);
            		$("#user_avatar").attr('src',json.data.middle);
            	}else{
            		ui.error(json.info);
            	}
            },
            dataType: 'json'
        }); 
        return false; 
    });
});
//添加标签
function addTag(){
	var tag_name = $('#tag_name').val();
	if(tag_name.length == 0) {
		ui.error('技能不能为空');
        return false;
    }
	$.getJSON("{:U('public/Account/addTag')}",{tag_name:tag_name},function(json){
		if( json.status == 1 ){
    		ui.success(json.info);
    		$("#tag_list").append("<li><a href='javascript:;'>&gt; "+tag_name+"(0)</a></li>");
    	}else{
    		ui.error(json.info);
    	}
	});
}
</script>
<include file="__THEME__/footer" />
</body>
</html>